package com.dc.refactoring._1_重新组织函数._7_RemoveAssignmentsToParameters;

/**
 * Description: 移除对参数的赋值
 * @author: gdc
 * @date: 2020/11/13
 * @version 1.0
 */
public class Test {

    public int fun1(int rel) {
        if (rel == 1) {
            rel += 1;
        } else {
            rel += 3;
        }
        return rel;
    }

    public int fun2(int rel) {
        int myRel = rel;
        if (myRel == 1) {
            myRel += 1;
        } else {
            myRel += 3;
        }
        return myRel;
    }
}
